package com.guxiaotu.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * {@code @ConfigurationProperties}对应配置application.yml中的person的属性,必须配置前缀属性person，否则对象全部为null
 * @author Gu Yuanhua
 * created time 2018/9/7 1:43
 */
@Component
@Data
@ConfigurationProperties("person")
public class Person {
    private String name;
    private Integer age;
    private Boolean boss;
    private Date birth;

    private Map<String,Object> maps;
    private List<Object> list;
    private Dog dog;

}
